var setBackground = function () {
    var width = $(window).width();
    var height = $(window).height();
    var bodyHeight = parseInt($('.com-bg').css('height'));
    $('.com-bg').css('width', width);
    if (bodyHeight > height) {
        $('.com-bg').css('height', bodyHeight);
    } else {
        $('.com-bg').css('height', height);
    }
    $('.com-bg').css('background', 'linear-gradient(#2B94AE, #234678)');
};
$(function () {
    setBackground();
    $(window).on('resize', function () {
        setBackground();
    });
});